<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <script language="javascript">



        function login(){

            var hostname = document.getElementById("hostname").value;
            var port = document.getElementById("port").value;
            var password = document.getElementById("password").value;
            var colorBits = document.getElementById("colorBits").value;
            var outputBPP = document.getElementById("outputBPP").value;
             document.cookie = "hostname=" + hostname;
             document.cookie = "port=" + port;
             document.cookie = "password=" + password;
             document.cookie = "colorBits=" + colorBits;
             document.cookie = "outputBPP=" + outputBPP;

            alert(document.cookie);
            document.getElementById("login").submit();
        }
    </script>
  </head>
  <body bgcolor="red">
<br>
<br><br>
<br>

<center>
    <form id="login" action="index.html" method="post">
<table>
    <tr>
        <td>
            主机地址：
        </td>
        <td>
            <input type="text" id="hostname" value="localhost"/>
        </td>
    </tr>

    <tr>
        <td>
            端口：
        </td>
        <td>
            <input type="text" id="port" value="5900"/>
        </td>
    </tr>

    <tr>
        <td>
            密码：
        </td>
        <td>
             <input type="password" id="password" value=""/>
        </td>
    </tr>

    <tr>
        <td>
           颜色：
        </td>
        <td>
           <select name="colorBits" id="colorBits">
              <option value ="24">24</option>
              <option value ="16">16</option>
              <option value="8">8</option>
            </select>
        </td>
    </tr>

    <tr>
        <td>
          输出颜色：
        </td>
        <td>
           <select name="outputBPP" id="outputBPP">
              <option value ="24">24</option>
              <option value="8">8</option>
            </select>
        </td>
    </tr>
    <tr align="center">
        <td colspan="2" align="center">
            <input type="button" value="登录" onclick="login();"/><br>
        </td>

    </tr>
</table>
            </form>
</center>

  </body>
</html>
